% -*-Omg-*-

% This is a sample file for the Omega mode with Alpha.  It is an excerpt of
% the torture.tex file written by Yannis Haralambous and John Plaice and
% provided with the Omega distribution.  The features which are herein
% described will work only if omegaMode has been properly installed.
% 
% - the first line of this file says % -*-Omg-*- It  is  a  magic  syntax  to
% establish the Omega mode in your file (otherwise it would be  in  TeX  mode
% since it has a .tex extension). It is inserted with the  'Set  Omega  Mode'
% menu item.
% 
% - syntax coloring : the usual TeX/LaTeX commands are colored in  blue.  The
% typical Omega commands are in magenta.
% 
% - the 'M' pop-up menu contains the list of the various packages, ocp's  and
% ocplists used in this file.
% 
% - the '{}' pop-up menu works like with TeX mode.
% 
% - if you option-click on the title bar, a list of all the  .tex,  .otp  and
% .log files in the current directory (if any) will show up.
% 
% - toggle TeX and Omega mode with the following key combinations :  escape-t
% and escapte-o.
% 
% - there is also a sophisticated system of completions and abbreviations
% in Omega Mode (please read the Omega Help File).  For instance, if the
% 'elecCompletion' package is activated, typing 'rbo' and hitting the 'F1'
% key will result in \removebeforeocplist.  Very handy for these long
% commands.  Typing 'rem' and the 'F1' key will complete to '\remove' ;
% hitting the F1 key again will bring a list of various possibilities to
% complete the word : removeafter, removeafterocplist, removebeforeocplist. 
% It is not necessary to type the backslash : Omega Mode will insert it
% automatically when completing.  See the doc for more.
% 
% 
% Please see the OtpSample.otp and OplSample.opl files for more examples
% about Omega Mode.  Omega Mode is under development (as is Omega itself). 
% Please check for the latest version of Omega Mode at :
% 
% <http://perso.easynet.fr/~berdesg/omega.html>

\documentclass[a4paper,11pt]{article}
\usepackage{amsmath}
\usepackage{omega}

\def\shortarab#1{{\pushocplist\ArabicOCP\fontfamily{omarb}\selectfont#1\popocplist}}
\def\shortberber#1{{\pushocplist\ArabicBerberOCP\fontfamily{omarb}\selectfont#1\popocplist}}
\def\shortgreek#1{{\pushocplist\GreekOCP\fontfamily{omlgc}\selectfont#1\popocplist}}
\def\shortlatberber#1{{\pushocplist\LatinBerberOCP\fontfamily{omlgc}\selectfont#1\popocplist}}
\def\shorttifi#1{{\pushocplist\TifinaghOCP\fontfamily{omlgc}\selectfont#1\popocplist}}
\def\shortpashto#1{{\pushocplist\AfghaPashtoOCP\fontfamily{omarb}\selectfont#1\popocplist}}

[snip] 

\begin{document}
\title{Multilingual Typesetting with \OMEGA, a Case Study: Arabic}
\date{}
\maketitle

[snip] 


\section{Overview of the \OMEGA{} Arabic Script Package}

Typesetting with \OMEGA{} is a process similar to typesetting with
\TeX: the user prepares a ``source'' file, containing the text of
\hisher{} document and a certain number of macro-commands for
attribute changes of the text (font characteristics, language, case,
etc.), references to figures (included in graphical format files on
disk) and other material included in or accompanying the text.

Once this source file prepared, \OMEGA{} is launched: it reads the
file, expands the commands and typesets the text accordingly. To
perform this task, \OMEGA{} loads and executes several \OTP{}s
(\OMEGA{} Translation Processes), which take care of low level
properties of the document (contextual analysis of the script, case
switching according to script and language, etc.). It also uses
different fonts, most of which are \emph{virtual}, in the sense that
they themselves call other fonts. On a higher level, such a document
uses \LaTeX{} packages, some of them modified to take advantage of the
additional features of \OMEGA{} vs.\ \TeX.

[snip] 

{\pardir TRT\textdir TRT\pushocplist\ArabicOCP\fontfamily{omarb}\selectfont
\begin{center}\begin{tabular}{|c|c|}\hline
{\textdir TRT HayA"t} & {\textdir TRT mayyit}\\\hline
{\mathdir TLT$\displaystyle\int_{\text{\textdir TRT Sif<>r}}^{\hbox dir TRT{\textdir TRT ghyr maH<>duUd}}f(x)\,dx$} & {\textdir TRT 'aanA}\\\hline
\end{tabular}\end{center}
\popocplist}
 
There are two key aspects to Arabic script typesetting,
unfortunately of unequal complexity: the first one is contextual
analysis, that is the fact that Arabic letters change shape according
to their position in a word, or according to the fact that they are
part of an abbreviation, etc. This aspect can be handled easily and
efficiently by \OTP{}s.  The second aspect is more global: it is the
fact that Arabic script is written from right to left.


[snip] 


\section{Parts of the \OMEGA{} Arabic Script Package}

This package consists of the following elements:


[snip] 


\section{Installation of the \OMEGA{} Arabic Script Package}

To use the \OMEGA{} Arabic Script Package you must have \OMEGA{}
version 1.45 or higher installed on your machine. Place OFM, OVF, TFM
and OCP files where the system expects to find them (if in doubt,
consult the \texttt{texmf.conf} file). Keep the \texttt{arabic.sty}
file somewhere where it can be found by \OMEGA{}. Finally add the
following few lines to the \texttt{psfonts.map} configuration file of
\texttt{odvips}etc.


[snip] 


\section{Basic Macros}


[snip] 


{\pardir TRT\textdir TRT
\begin{center}
\begin{arab}
\Huge
'aahlAaN wa sahlAaN!
\end{arab}
\end{center}
}

\noindent
Example of vowelized Arabic:\\[8pt]

{\pardir TRT\textdir TRT
\begin{quote}
\pushocplist\ArabicOCP\fontfamily{omarb}\selectfont\LARGE li'aannahaA
"Al<>'Ana laA tufakkiru fiI naf<>sihaA, walakinnahaA tufakkiru fiI
'aakhaway<>haA wafiI "Al<>khaTari "AlladhiI laHiqahumaA.  \popocplist
\end{quote}
}


[snip] 


\subsubsection{Berber Transcription}


[snip] 


\noindent
Example: 

{\pardir TRT\textdir TRT
\begin{quote}
\pushocplist\ArabicBerberOCP\fontfamily{omarb}\selectfont Tifinagh,
d--tira timezwura n .imazighen.  Llant di tmurt--nnegh dat tira n
ta.erabt d--tla.tinit. Nnulfant--edd dat .imir n ugellid
Masinisen. .Imazighen n .imir--en, ttarun--tent ghefi.zra, degg
.ifran, ghef .igduren, maca tiggti ghef i.zekwan~: ttarun fell--asen
.isem n umettin, d wi--t--ilan, d wayen yexdem di tudert--is akken ur
t ttettun .ina.tfaren.  \popocplist
\end{quote}}


[snip] 


\section{Writing Your Own Transcription}\label{writingOTPs}

We have developed and presented in this paper a certain number of
Arabic alphabet language transcriptions for two reasons: first, to
show the possibilities and power of \OMEGA, and second, to give a
starting point for the user to create \hisher{} own transcriptions.

[snip] 


\begin{verbatim}
\ocp\ArabUni=7arb2uni
\ocp\UniCUni=uni2cuni
\ocp\CUniArab=cuni2oar
\ocplist\ArabicOCP=
\addbeforeocplist 100 \ArabUni
\addbeforeocplist 200 \UniCUni
\addbeforeocplist 300 \CUniArab
\nullocplist
\pushocplist\ArabicOCP
\end{verbatim}

\noindent is sufficient to load all \OTP{}s necessary for typesetting
in the Arabic language.

\section{Availability and Further Information}


[snip] 


\newpage
\pagedir TRT
\bodydir TRT
\pardir TRT
\textdir TRT
\def\latinit#1{{\fontfamily{omlgc}\selectfont\pushocplist\BasicLatinOCP%
\textdir TLT #1\popocplist}}
\def\rmdefault{omarb}
\fontfamily{omarb}\selectfont
\pushocplist\ArabicOCP


\subsection{'aTfAl AlghAb"t}

kAn l'aHd AlmlUk AlqdmA|| 'akht t`ysh m`h fI qSrh, b`d 'an mAt-t
zUjt-h, wtrkt lh mn Al'awlAd thlAth"t: 'amyryn w'amyr"t. wqd AzdAd Hbb
Almlk l'awlAd-h, b`d wfA"t wAldt-hm Almlk"t, w'aHbbhm HbbA kthyrA;
ly`wwDhm mA fqdUh mn `Tf 'ammhm wHbbhA lhm, wtfkyr hA fyhm; fkAn ys'al
`nhm kllmA HDr, wyfkkr fyhm kllmA dkhl, wywSI bhm kllmA khrj, wyTlbhm
kllmA jls ltnAwl T`Am Al'ifTAr 'aU AlghdA|| 'aU AlshshAI 'aU Al`shA||.


[snip] 

\popocplist

\pushocplist\ArabicBerberOCP

\subsection{Allal i useqdc n y.drisn \OMEGA\ d-tamazight}

A dd nessken s wayes yif useqdec n \OMEGA\ i tira s tutlayt tamazight,
ama s tifinagh, ama s isekkilen ila.taniyen. Newwi-dd tamazight am,
tutlayt yeddren (yettwarun s tifinagh tiynayin)~: izmer umdan ad
iseddu yall tighura n usuddes n tira, i waraten ussnanen, itekniken
negh i wid n tsikkla, am wid ssexdamen i usemsaru n tfransist.


[snip] 

\popocplist

\pushocplist\SindhiOCP
\subsection{ktyn kr mU.ryA j.=d-hn}

tn-hn kry AsAn khy pn-hnjy =z-hnn khy sjA=g rkh'nU pUndU ||eN pn-hnjy
jdUj-hd meN .=dA-hp pydA kr'ny. AhU b/ m`lUm kr'nU pUndU t/ sndh meN
hr 'A'yy wqt chA chA thy r-hyU 'Ahy ||eN dshmn AsAn jy ||eN AsAn jy
jdUj-hd jy khlAf k-h.rA k-h.rA g-hA.t g-h.ry r-hyU 'Ahy.

[snip] 

\popocplist

\end{document} 


